﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using EfSearchModel.Model;

namespace QuickApp.Core
{
    public interface ICrudService<T> where T : class
    {
        void Create(T entity);
        void Save(T entity);
        void Delete(string id);
        void Delete(Func<T, bool> predicate);
        T Get(string id);
        IQueryable<T> Get(Expression<Func<T, bool>> predicate);
        int Count();
        IPageable<T> GetPageable(PageInfo pageInfo, QueryModel query);
    }
}
